[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
EOF                      Returns TRUE If at End of File

 EOF(var InFile : <file type>) : Boolean;

    Tests to see if the end of the specified file has been reached;
    returns TRUE if this is the case; otherwise, returns FALSE.

          InFile    Any file type (text, data, untyped), previously opened
                    for input (using Assign and Reset).

           Note:    This function is usually used when reading from a
                    file. This service also returns TRUE if a Seek (or
                    LongSeek) beyond the end of the file is performed.

  -------------------------------- Example ---------------------------------

           Assign(TFile,'MYWORDS.TXT');
           Reset(TFile);
           while not EOF(TFile) do begin
             Readln(TFile,Line);
             Writeln(Line)
           end;
           Close(TFile);

See Also: EOLN Read Seek LongSeek
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson